import { useSelector } from "react-redux";
import type { StateType, ComponentStateType } from "@/store";
function useGetComponents() {
  const components = useSelector<StateType>((state) => state.components) as ComponentStateType;
  const { componentList = [], selectedId = "" } = components;
  return { componentList, selectedId };
}
export default useGetComponents;
